<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>组织关系转接</title>
    <meta name="keywords" content="组织关系转接" />
    <meta name="description" content="组织关系转接" />
    <link href="/static/css/party/style.css" rel="stylesheet" type="text/css">
    <link href="/static/js/party/myfocus/js/mf-pattern/mF_classicHC.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="/static/webjars/layui/css/layui.css"  media="all">
    <script type="application/javascript" src="/static/js/jquery.min.js"></script>

    <link rel="stylesheet" href="/static/css/party/foot.css"/>
    <link href="/static/css/party/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="/static/css/party/common.css" rel="stylesheet" type="text/css">
    <link href="/static/css/party/common2018.css.css" rel="stylesheet" type="text/css">
    <link href="/static/css/party/iconfont.css" rel="stylesheet" type="text/css">
    <script type="application/javascript" src="/static/webjars/layui/layui.all.js"></script>

    <link href="/static/css/party/font-awesome.min.css" rel="stylesheet" type="text/css">
    <script type="application/javascript" src="/static/js/party/template-web.js"></script>
    <script type="application/javascript" src="/static/js/party/template-web-extends.js"></script>
    <script type="application/javascript" src="/static/js/party/boorstap.min.js"></script>
    <script type="application/javascript" src="/static/js/party/common.js"></script>

</head>
<body>
<div class="padlogo w1200 mt50">
    <div class="danghui fl ml25"><img src="/static/images/party/img/danghui.gif"/></div>
    <div class="logo fl ml20 mt8"><img src="/static/images/party/img/logo.png"/></div>
    <div class="slogo fr"><embed src="/static/images/party/img/donghua.swf" width="600" height="150" wmode="transparent" /></div>
    <div class="clear"></div>
</div>

<div class="w1000 mt60" >
    <ul class="nav" style="text-align: center" id="dingbu">
        <li class="bg2">&nbsp;</li>
        <li class="bg2" style="width: 143px;" party-src="/party/home/index"><a href="javascript:;">首页</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/news"><a href="javascript:;">新闻资讯</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/education"><a href="javascript:;">教育培训</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/service"><a href="javascript:;">服务大厅</a></li>
        <li class="bg2" style="width: 143px" party-src="/party/home/map"><a href="javascript:;">党建地图</a></li>
        <li class="bg2" style="width: 143px"><a href="/party/home/admin" target="_blank">后台管理</a></li>

        <%--<li class="bg2"><a href='/views/party/fore/index1.jsp' target='_blank'>后台管理</a></li>--%>
    </ul>

</div>
<div class='nav_bg w1000 mt30'><img src='/static/images/party/img/nav_bg.png' class='tcenter'/></div>

<div class="clearfix"></div>
<div class="container" style="height: 768px;">

    <div class="row">
        <div class="col-sm-12"> <img src="/static/images/party/img/banner06.png"></div>
    </div>
    <div class="row">
        <div class="col-sm-6"><h4 class="service-red-border"><img src="/static/images/party/img/fwdt-icon02.png">组织关系转接</h4></div>
        <div class="col-sm-6 text-right" style=" margin-top:30px; padding-right: 20px;"><small style="color: #DF2828; padding-right: 20px;">请认真填写必填项</small></div>

    </div>
    <div class="row" style="background-color: #F5F5F5; padding:-10px 10px 10px 10px;">
        <div class="col-sm-12" style="background-color: #DEEAEA; ">
            <form id="change" class="layui-form">
                <div class="form-group col-md-8 col-md-offset-2">
                    <br><br><br>
                    <div class="col-sm-3 text-right" style="line-height: 35px;"><label>姓名：</label> </div>
                    <div class="col-sm-9 " style="margin-bottom: 20px;">
                        <input type="text" class="form-control form-control-bg"  name="name" placeholder="必填项" maxlength="10" id="us" lay-verify="required">
                    </div>

                    <div class="col-sm-3 text-right" style="line-height: 35px;"><label>所在党支部：</label> </div>
                    <div class="col-sm-9 " style="margin-bottom: 20px;">
                        <div class="layui-inline" style="width: 100%;">

                            <div class="layui-input-inline" style="width: 100%;">
                                <select name="nowGroup" id="nowGroup" lay-verify="required" lay-search="" style="width: 100%;">

                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-3 text-right" style="line-height: 35px;"><label>转入党支部：</label> </div>
                    <div class="col-sm-9 " style="margin-bottom: 20px;">

                        <div class="layui-inline" style="width: 100%;">

                            <div class="layui-input-inline" style="width: 100%;">
                                <select name="toGroup" id="toGroup" lay-verify="required" lay-search="" style="width: 100%;">

                                </select>
                            </div>
                        </div>

                    </div>
                    <div class="col-sm-3 text-right" style="line-height: 35px;"><label>党费已缴纳时间：</label> </div>
                    <div class="col-sm-9 " style="margin-bottom: 20px;">
                        <input type="text" class="layui-input" name="payTime" id="partyPay" lay-verify="required">
                    </div>

                    <div class="col-sm-3 text-right" style="line-height: 35px;"><label>个人联系方式：</label> </div>
                    <div class="col-sm-9 " style="margin-bottom: 20px;">
                        <input type="text" class="form-control form-control-bg" name="personalTel" placeholder="必填项" maxlength="11" lay-verify="required">
                    </div>

                    <div class="col-sm-3 text-right" style="line-height: 35px;"><label>转接原因：</label> </div>
                    <div class="col-sm-9 " style="margin-bottom: 20px;">
                        <textarea class="form-control form-control-bg" placeholder="请详细介绍您的需求限200字以内" rows="4" name="reason" maxlength="200" lay-verify="required"></textarea>
                    </div>

                    <input name="userGuid" id="userGuid" type="hidden" />
                </div>
            </form>
        </div>
        <div class="col-sm-12 text-center" style=";background-color: #DEEAEA;padding: 30px;">
            <button type="button" class="btn btn-danger btn-default" style="margin-right: 20px;" id="ok"> 提 交 </button>
            <button type="button" class="btn btn-danger btn-default" id="reset"> 重 置 </button>
        </div>
    </div>
</div>

<div id="ft" class="clearfix">
    <div class="ft-center">
        <span>智慧兴文公共信息平台:&nbsp;</span>
        <a>All Rights Reserved.&nbsp;&nbsp;</a>
        <span>版权所有:&nbsp;</span>
        <a href="http://www.ituohui.com/" target="_blank">四川省数聚汇智科技有限公司</a>
    </div>
</div>

</body>
</html>
<script type="application/javascript">
    $("li[party-src]").click(function(){
        var that = $(this);
        var src = that.attr("party-src");
        window.location.href = src;
    });
</script>



<script>
    var form = layui.form;
    form.render();
    $.post("/ajax/party/admin/branches",{
        check:1024
    },function (res) {
        if(res.code==0){
            //得到所有级别
            var names = new Array();
            for(var i=0;i<res.data.length;i++){
                names[i]=res.data[i].branchName;
            }
            console.log(names);
            //将等级动态显示到界面上
            for(var i=0;i<names.length;i++){
                document.getElementById("nowGroup").options.add(new Option(names[i],names[i]));
                document.getElementById("toGroup").options.add(new Option(names[i],names[i]));
            }

        }
        else{
            layer.alert("未知错误！");
        }
        form.render();
    });


</script>

<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#partyPay' //指定元素
        });
    });
</script>

<script type="application/javascript">

  $(function () {
      $("#ok").click(function () {
          var params = {
              name:$("input[name=name]").val(),
              nowGroup:$("select[name=nowGroup]").val(),
              toGroup:$("select[name=toGroup]").val(),
              payTime:$("input[name=payTime]").val(),
              personalTel:$("input[name=personalTel]").val(),
              reason:$("textarea[name=reason]").val()
          };
        console.log(params);

        if(params.name==""){
            layer.alert("姓名不能为空！");
        }else if(params.nowGroup==""){
            layer.alert("所在党支部不能为空！");
        }else if(params.toGroup==""){
            layer.alert("转入党支部不能为空！");
        }else if(params.payTime==""){
            layer.alert("党费缴纳时间不能为空！");
        }else if(params.personalTel==""){
            layer.alert("个人联系方式不能为空！");
        }else if(params.reason==""){
            layer.alert("转接原因不能为空！");
        }else{
            $.post("/ajax/party/saveInfo",{
                    name:params.name,
                    nowGroup:params.nowGroup,
                    toGroup:params.toGroup,
                    payTime:params.payTime,
                    personalTel:params.personalTel,
                    reason:params.reason
                },function (res) {
                    if(res.code==0){
                        layer.alert("提交成功，请耐心等待！");
                    }
                }
            )
        }




      });

      $("#reset").click(function () {
         document.getElementById("change").reset();
      });


  })


</script>
